\documentclass[a4paper,12pt,oneside]{book}

\usepackage[spanish]{babel}

\usepackage{eso-pic}

%este paquete es para manejar las imagenes
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[hang, small, bf, font={small,it}]{caption}

\usepackage[dvips, includefoot]{geometry}

\usepackage{makeidx}

\usepackage{url}

\usepackage{colortbl}
%\usepackage{dcolumn,longtable,hhline,colortbl}
%\usepackage[table]{xcolor}

%%%**************************************************************

% Tells `dvips' and `pdfTeX' the papersize.

% `rose.eps' from CTAN: macros/generic/boxedeps/
\newcommand\BackgroundPicture{%
   \put(0,0){%
     \parbox[b][\paperheight]{\paperwidth}{%
       \vfill
       \centering
       \includegraphics{ImagenesTesis/Otros/logoUC3bg.png}%
       \vfill
     }}}  
% The picture is centered on the page background

\AddToShipoutPicture{\BackgroundPicture}
%%%**************************************************************

%%*****************************************************
%% Imagen de fondo para marca de agua
%\usepackage{draftwatermark}
%\SetWatermarkText{\includegraphics{logoUC3.png}}
%%*****************************************************


%*************************************************************************
% Definimos la zona de la pagina ocupada por el texto
\oddsidemargin 1.5cm
\headsep 0cm
\textwidth=14.8cm
\textheight=23cm
\headheight = 16pt
%*************************************************************************

%%%************************************************
%%%************************************************
%%% Cambiamos los nombre de los Capï¿½tulos a espaï¿½ol 
\renewcommand{\chaptername}{Cap\'itulo }
%%% Cambiamos los nombre de las figuras 
\renewcommand{\figurename}{Figura }
%%% Cambiamos los nombre de las tablas 
\renewcommand{\tablename}{Tabla }
%**************************************************



\usepackage{fancyhdr}
\usepackage{float}
\usepackage{appendix}

\usepackage{titlesec}		
\titleformat{\chapter}[display]
  {\bfseries\Large}
  {\centering \Large \chaptertitlename \hspace{1mm} \thechapter}
  {1ex}
  {\centering \LARGE \titlerule[2pt] \vspace{1ex}}
  [\vspace{1ex}\titlerule]

\let\originalclearpage=\clearpage%supress pagebreak/clear page must use \pagebreak when needed
\def\clearpage{\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Glossary:
\usepackage[acronym]{glossaries}
\makeglossaries

\newglossaryentry{computer}
{
  name=computer,
  description={is a programmable machine that receives input,
               stores and manipulates data, and provides
               output in a useful format}
}
\newacronym{XMLlabel}{XML}{\emph{Extensive Markup Language}}

\newacronym{HTMLlabel}{HTML}{\emph{HyperText Markup Language}}

\newacronym{SRSlabel}{SRS}{\emph{Sistema de Recomendaci\'on Sem\'antico}}

\newacronym{SRlabel}{SR}{\emph{Sistema de Recomendaci\'on}}

\newacronym{OWLlabel}{OWL}{\emph{Web Ontology Language}}

\newacronym{RDFlabel}{RDF}{\emph{Resources Description Framework}}

\newacronym{RDFSlabel}{RDFS}{\emph{Resources Description Framework Schema}}

\newacronym{W3Clabel}{W3C}{\emph{World Wide Web Consortium}}

\newacronym{URIlabel}{URI}{\emph{Uniform Resource Identifier}}

\newacronym{RIFlabel}{RIF}{\emph{Rule Interchange Format}}

\newacronym{IRIlabel}{IRI}{\emph{Identificador Internacional de Recursos}}

\newacronym{DOIlabel}{DOI}{\emph{Degree of Interest}}

\newacronym{SOAlabel}{SOA}{\emph{Service Oriented Application}}

\newacronym{KNNlabel}{KNN}{\emph{K Nearest Neighbors}}
 
\newacronym{IDElabel}{IDE}{\emph{Integrated Development Environment}}

\newacronym{APIlabel}{API}{\emph{Application Programming Interface}}

\newacronym{DBMSlabel}{DBMS}{\emph{Data Base Managment System}}

\newacronym{OMDBlabel}{OMDB}{\emph{Open Movie Data Base}}

\newacronym{IMDBlabel}{IMDB}{\emph{Internet Movie Data Base}}

\newacronym{MAElabel}{MAE}{\emph{Mean Absolute Error}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeindex

%\usepackage[toc,page,header]{appendix}

%***************************************************************************************************
\begin{document}
%Pagina de Inicio - 
\newpage
\pagenumbering{arabic}
\normalsize
\input{Portada}

% ------------------ Headings Style for Intro Pages ----------------------------
\topmargin -1cm
\headheight = 56pt
\headsep = 1cm
\textheight=22cm

\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyfoot{}
\headsep = 1cm
\footskip = 12pt

\fancyhead[R]{Universidad de Cuenca - Facultad de Ingenier\'ia} %encabezado
\lhead{\includegraphics[height=18mm]{Escudo2.png}}
\lfoot[c]{Johnny Avila - Xavier Riofr\'io}

\renewcommand{\footrulewidth}{0.4pt}
%---------------------------------------------------------------------------------

\headsep 1cm
\topmargin -1cm

\newpage

\normalsize

\singlespace


%---------------------------------------------------------------------------------
\topmargin -1cm
\headsep = 1cm
\footskip = 25pt

\headheight = 56pt
\textheight=23cm
%\pagestyle{fancy}

%\fancyhead{} % clear all header fields
%\fancyfoot{}
%\fancyhead[R]{\slshape \leftmark} %encabezado con nombre del capitulo
%\lhead{\includegraphics[height=18mm]{Escudo2.png}}

%\fancyfoot[R]{\thepage}
%\fancyfoot[L]{Johnny \'Avila - Xavier Riofr\'io}
%\renewcommand{\footrulewidth}{0.4pt}
%---------------------------------------------------------------------------------
\newpage
%////////////////////////////////////////////////////////////////////////
%\fancyhead{} % clear all header fields
%\fancyfoot{}
%\fancyhead[R]{\slshape \leftmark} %encabezado con nombre del capitulo
%\lhead{\includegraphics[height=18mm]{Escudo2.png}}

%\fancyfoot[R]{\thepage}
%\fancyfoot[L]{Johnny \'Avila - Xavier Riofr\'io}
%\renewcommand{\footrulewidth}{0.4pt}
%////////////////////////////////////////////////////////////////////////

%\newpage
\newpage

\renewcommand*\abstractname{Resumen}
\addcontentsline{toc}{section}{Resumen}
\include{Abstract}
\newpage
\newpage
\renewcommand*\abstractname{Abstract}
\addcontentsline{toc}{section}{Abstract}
\include{AbstractENG}
\newpage
%Ubicacion del indice
\renewcommand\contentsname{\'Indice general}
\addcontentsline{toc}{section}{\'Indice general}
\tableofcontents  \newpage
\renewcommand*\listfigurename{\'Indice de figuras}
\addcontentsline{toc}{section}{\'Indice de figuras}
\listoffigures  \newpage
\renewcommand*\listtablename{\'Indice de tablas}
\addcontentsline{toc}{section}{\'Indice de tablas}
\listoftables  \newpage

\renewcommand*\tablename{Tabla}

%Prologo del Texto
 \newpage 


\newpage
%////////////////////////////////////////////////////////////////////////
\fancyhead{} % clear all header fields
\fancyfoot{}
\fancyhead[R]{\slshape \leftmark} %encabezado con nombre del capitulo
\lhead{\includegraphics[height=18mm]{Escudo2.png}}

\fancyfoot[R]{\thepage}
\fancyfoot[L]{Johnny \'Avila - Xavier Riofr\'io}
\renewcommand{\footrulewidth}{0.4pt}
%////////////////////////////////////////////////////////////////////////

\newpage 
%\pagenumbering{arabic}

\onehalfspace{}
\normalsize
%\headsep 1cm


%\textheight=22cm
%Capitulos:
%Pagina de Inicio - Portada
\newpage
\input{intro}

\newpage
\input{Cap1}

\newpage
\input{Cap2}

\newpage
\input{Cap4}

\newpage
\input{Cap5}

\newpage
\input{conclu}


\newpage
\renewcommand\appendixname{Anexo}
\renewcommand\appendixtocname{Anexos}
\renewcommand\appendixpagename{ANEXOS}
\appendix
\clearpage
\noappendicestocpagenum
\addappheadtotoc
%\addcontentsline{toc}{part}{Anexos}
\input{Anexo1}


\cleardoublepage

\newpage
\renewcommand*\acronymname{Acr\'onimos}
\glsaddall
\printglossary[type=\acronymtype,title=ACR\'ONIMOS]
\addcontentsline{toc}{part}{Acr\'onimos} 

\newpage
\addcontentsline{toc}{part}{Bibliograf\'ia.}
\bibliography{biblioG}
\bibliographystyle{ieeetran}
\newpage


\end{document}